home *** CD-ROM | disk | FTP | other *** search
- <HTML>
-
- <HEAD>
-
- <TITLE>Displaying Context-Sensitive Menus Using Mouse Position</TITLE>
-
- <STYLE TYPE="text/css">
-
- .contextMenu { background-color: #CCCCCC; font-size: 9pt;
-
- font-family: ms sans serif, helvetica, sans-serif;
-
- line-height: 1.5em; padding: 10px;
-
- border-style: solid; border-width: 1;
-
- border-color: white; }
-
- </STYLE>
-
-
-
- <SCRIPT>
-
- function showDefaultMenu(event)
-
- {
-
- if (event.modifiers & Event.CONTROL_MASK)
-
- {
-
- document.defaultMenu.left = event.x;
-
- document.defaultMenu.top = event.y;
-
- document.defaultMenu.visibility = "show";
-
- }
-
- }
-
-
-
- function hideDefaultMenu(event)
-
- {
-
- document.defaultMenu.visibility = "hide";
-
- }
-
-
-
- document.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP);
-
- document.onmousedown = showDefaultMenu;
-
- document.onmouseup = hideDefaultMenu;
-
- </SCRIPT>
-
- </HEAD>
-
-
-
- <BODY>
-
- <H2>Displaying Context-Sensitive Menus Using Mouse Position</H2>
-
-
-
- <DIV ID=defaultMenu CLASS=contextMenu
-
- STYLE="position: absolute; visibility: hide; width: 100; ">
-
- Cut<BR>
-
- Copy<BR>
-
- Paste
-
- </DIV>
-
-
-
- </BODY>
-
- </HTML>
-
-